package com.bw.module_announcement.repoistory

import com.bw.module_announcement.http.AnnouncementApi
import com.bw.module_announcement.http.AnnouncementNetModule
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

class AnnouncementRepository @Inject constructor(){

    @Inject
    lateinit var api:AnnouncementApi
    fun getAnnouncements(page:Int, size:Int) = flow {
        emit(api.getAnnouncements(page, size))
    }.flowOn(Dispatchers.IO)
}